package com.imti.mall.admin.config;

import com.google.common.base.Predicate;
import com.google.common.collect.Lists;
import com.imti.mall.common.config.BaseSwaggerConfig;
import com.imti.mall.common.domain.SwaggerProperties;
import com.imti.mall.common.config.BaseSwaggerConfig;
import com.imti.mall.common.domain.SwaggerProperties;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.RequestHandler;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.OAuthBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.util.ArrayList;
import java.util.List;

/**
 * Swagger API文档相关配置
 */
@Configuration
@EnableSwagger2
public class SwaggerConfig extends BaseSwaggerConfig {

    @Override
    public SwaggerProperties swaggerProperties() {
        return SwaggerProperties.builder()
            .apiBasePackage("com.imti.mall.admin.controller")
            .title("英泰商城API系统")
            .description("<div style='size: 18px;'>英泰商城API系统</div>")
            .contactName("leoliu")
            .version("1.0.0")
            .enableSecurity(true)
            .build();
    }
}
